/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Wires.impl;

import EA_Model.IEC61970.Core.impl.ConductingEquipmentImpl;

import EA_Model.IEC61970.Domain.ApparentPower;
import EA_Model.IEC61970.Domain.Conductance;
import EA_Model.IEC61970.Domain.Reactance;
import EA_Model.IEC61970.Domain.Resistance;
import EA_Model.IEC61970.Domain.Susceptance;
import EA_Model.IEC61970.Domain.Voltage;

import EA_Model.IEC61970.Wires.TransformerWinding;
import EA_Model.IEC61970.Wires.WindingConnection;
import EA_Model.IEC61970.Wires.WindingType;
import EA_Model.IEC61970.Wires.WiresPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Transformer Winding</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getB <em>B</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getB0 <em>B0</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getConnectionType <em>Connection Type</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getEmergencyS <em>Emergency S</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getG <em>G</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getG0 <em>G0</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getGrounded <em>Grounded</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getInsulationU <em>Insulation U</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getR <em>R</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getR0 <em>R0</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getRatedS <em>Rated S</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getRatedU <em>Rated U</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getRground <em>Rground</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getShortTermS <em>Short Term S</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getWindingType <em>Winding Type</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getX <em>X</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getX0 <em>X0</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Wires.impl.TransformerWindingImpl#getXground <em>Xground</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class TransformerWindingImpl extends ConductingEquipmentImpl implements TransformerWinding {
	/**
	 * The cached value of the '{@link #getB() <em>B</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getB()
	 * @generated
	 * @ordered
	 */
	protected Susceptance b;

	/**
	 * The cached value of the '{@link #getB0() <em>B0</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getB0()
	 * @generated
	 * @ordered
	 */
	protected Susceptance b0;

	/**
	 * The default value of the '{@link #getConnectionType() <em>Connection Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConnectionType()
	 * @generated
	 * @ordered
	 */
	protected static final WindingConnection CONNECTION_TYPE_EDEFAULT = WindingConnection.D;

	/**
	 * The cached value of the '{@link #getConnectionType() <em>Connection Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConnectionType()
	 * @generated
	 * @ordered
	 */
	protected WindingConnection connectionType = CONNECTION_TYPE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getEmergencyS() <em>Emergency S</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEmergencyS()
	 * @generated
	 * @ordered
	 */
	protected ApparentPower emergencyS;

	/**
	 * The cached value of the '{@link #getG() <em>G</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getG()
	 * @generated
	 * @ordered
	 */
	protected Conductance g;

	/**
	 * The cached value of the '{@link #getG0() <em>G0</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getG0()
	 * @generated
	 * @ordered
	 */
	protected Conductance g0;

	/**
	 * The cached value of the '{@link #getGrounded() <em>Grounded</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getGrounded()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean grounded;

	/**
	 * The cached value of the '{@link #getInsulationU() <em>Insulation U</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInsulationU()
	 * @generated
	 * @ordered
	 */
	protected Voltage insulationU;

	/**
	 * The cached value of the '{@link #getR() <em>R</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getR()
	 * @generated
	 * @ordered
	 */
	protected Resistance r;

	/**
	 * The cached value of the '{@link #getR0() <em>R0</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getR0()
	 * @generated
	 * @ordered
	 */
	protected Resistance r0;

	/**
	 * The cached value of the '{@link #getRatedS() <em>Rated S</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRatedS()
	 * @generated
	 * @ordered
	 */
	protected ApparentPower ratedS;

	/**
	 * The cached value of the '{@link #getRatedU() <em>Rated U</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRatedU()
	 * @generated
	 * @ordered
	 */
	protected Voltage ratedU;

	/**
	 * The cached value of the '{@link #getRground() <em>Rground</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRground()
	 * @generated
	 * @ordered
	 */
	protected Resistance rground;

	/**
	 * The cached value of the '{@link #getShortTermS() <em>Short Term S</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getShortTermS()
	 * @generated
	 * @ordered
	 */
	protected ApparentPower shortTermS;

	/**
	 * The default value of the '{@link #getWindingType() <em>Winding Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getWindingType()
	 * @generated
	 * @ordered
	 */
	protected static final WindingType WINDING_TYPE_EDEFAULT = WindingType.PRIMARY;

	/**
	 * The cached value of the '{@link #getWindingType() <em>Winding Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getWindingType()
	 * @generated
	 * @ordered
	 */
	protected WindingType windingType = WINDING_TYPE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getX() <em>X</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getX()
	 * @generated
	 * @ordered
	 */
	protected Reactance x;

	/**
	 * The cached value of the '{@link #getX0() <em>X0</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getX0()
	 * @generated
	 * @ordered
	 */
	protected Reactance x0;

	/**
	 * The cached value of the '{@link #getXground() <em>Xground</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getXground()
	 * @generated
	 * @ordered
	 */
	protected Reactance xground;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected TransformerWindingImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return WiresPackage.Literals.TRANSFORMER_WINDING;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Susceptance getB() {
		if (b != null && b.eIsProxy()) {
			InternalEObject oldB = (InternalEObject)b;
			b = (Susceptance)eResolveProxy(oldB);
			if (b != oldB) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__B, oldB, b));
			}
		}
		return b;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Susceptance basicGetB() {
		return b;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setB(Susceptance newB) {
		Susceptance oldB = b;
		b = newB;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__B, oldB, b));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Susceptance getB0() {
		if (b0 != null && b0.eIsProxy()) {
			InternalEObject oldB0 = (InternalEObject)b0;
			b0 = (Susceptance)eResolveProxy(oldB0);
			if (b0 != oldB0) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__B0, oldB0, b0));
			}
		}
		return b0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Susceptance basicGetB0() {
		return b0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setB0(Susceptance newB0) {
		Susceptance oldB0 = b0;
		b0 = newB0;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__B0, oldB0, b0));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public WindingConnection getConnectionType() {
		return connectionType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setConnectionType(WindingConnection newConnectionType) {
		WindingConnection oldConnectionType = connectionType;
		connectionType = newConnectionType == null ? CONNECTION_TYPE_EDEFAULT : newConnectionType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__CONNECTION_TYPE, oldConnectionType, connectionType));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ApparentPower getEmergencyS() {
		if (emergencyS != null && emergencyS.eIsProxy()) {
			InternalEObject oldEmergencyS = (InternalEObject)emergencyS;
			emergencyS = (ApparentPower)eResolveProxy(oldEmergencyS);
			if (emergencyS != oldEmergencyS) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__EMERGENCY_S, oldEmergencyS, emergencyS));
			}
		}
		return emergencyS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ApparentPower basicGetEmergencyS() {
		return emergencyS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEmergencyS(ApparentPower newEmergencyS) {
		ApparentPower oldEmergencyS = emergencyS;
		emergencyS = newEmergencyS;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__EMERGENCY_S, oldEmergencyS, emergencyS));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Conductance getG() {
		if (g != null && g.eIsProxy()) {
			InternalEObject oldG = (InternalEObject)g;
			g = (Conductance)eResolveProxy(oldG);
			if (g != oldG) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__G, oldG, g));
			}
		}
		return g;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Conductance basicGetG() {
		return g;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setG(Conductance newG) {
		Conductance oldG = g;
		g = newG;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__G, oldG, g));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Conductance getG0() {
		if (g0 != null && g0.eIsProxy()) {
			InternalEObject oldG0 = (InternalEObject)g0;
			g0 = (Conductance)eResolveProxy(oldG0);
			if (g0 != oldG0) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__G0, oldG0, g0));
			}
		}
		return g0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Conductance basicGetG0() {
		return g0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setG0(Conductance newG0) {
		Conductance oldG0 = g0;
		g0 = newG0;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__G0, oldG0, g0));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getGrounded() {
		if (grounded != null && grounded.eIsProxy()) {
			InternalEObject oldGrounded = (InternalEObject)grounded;
			grounded = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldGrounded);
			if (grounded != oldGrounded) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__GROUNDED, oldGrounded, grounded));
			}
		}
		return grounded;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetGrounded() {
		return grounded;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setGrounded(EA_Model.IEC61970.Domain.Boolean newGrounded) {
		EA_Model.IEC61970.Domain.Boolean oldGrounded = grounded;
		grounded = newGrounded;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__GROUNDED, oldGrounded, grounded));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Voltage getInsulationU() {
		if (insulationU != null && insulationU.eIsProxy()) {
			InternalEObject oldInsulationU = (InternalEObject)insulationU;
			insulationU = (Voltage)eResolveProxy(oldInsulationU);
			if (insulationU != oldInsulationU) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__INSULATION_U, oldInsulationU, insulationU));
			}
		}
		return insulationU;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Voltage basicGetInsulationU() {
		return insulationU;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setInsulationU(Voltage newInsulationU) {
		Voltage oldInsulationU = insulationU;
		insulationU = newInsulationU;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__INSULATION_U, oldInsulationU, insulationU));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Resistance getR() {
		if (r != null && r.eIsProxy()) {
			InternalEObject oldR = (InternalEObject)r;
			r = (Resistance)eResolveProxy(oldR);
			if (r != oldR) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__R, oldR, r));
			}
		}
		return r;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Resistance basicGetR() {
		return r;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setR(Resistance newR) {
		Resistance oldR = r;
		r = newR;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__R, oldR, r));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Resistance getR0() {
		if (r0 != null && r0.eIsProxy()) {
			InternalEObject oldR0 = (InternalEObject)r0;
			r0 = (Resistance)eResolveProxy(oldR0);
			if (r0 != oldR0) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__R0, oldR0, r0));
			}
		}
		return r0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Resistance basicGetR0() {
		return r0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setR0(Resistance newR0) {
		Resistance oldR0 = r0;
		r0 = newR0;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__R0, oldR0, r0));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ApparentPower getRatedS() {
		if (ratedS != null && ratedS.eIsProxy()) {
			InternalEObject oldRatedS = (InternalEObject)ratedS;
			ratedS = (ApparentPower)eResolveProxy(oldRatedS);
			if (ratedS != oldRatedS) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__RATED_S, oldRatedS, ratedS));
			}
		}
		return ratedS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ApparentPower basicGetRatedS() {
		return ratedS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRatedS(ApparentPower newRatedS) {
		ApparentPower oldRatedS = ratedS;
		ratedS = newRatedS;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__RATED_S, oldRatedS, ratedS));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Voltage getRatedU() {
		if (ratedU != null && ratedU.eIsProxy()) {
			InternalEObject oldRatedU = (InternalEObject)ratedU;
			ratedU = (Voltage)eResolveProxy(oldRatedU);
			if (ratedU != oldRatedU) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__RATED_U, oldRatedU, ratedU));
			}
		}
		return ratedU;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Voltage basicGetRatedU() {
		return ratedU;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRatedU(Voltage newRatedU) {
		Voltage oldRatedU = ratedU;
		ratedU = newRatedU;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__RATED_U, oldRatedU, ratedU));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Resistance getRground() {
		if (rground != null && rground.eIsProxy()) {
			InternalEObject oldRground = (InternalEObject)rground;
			rground = (Resistance)eResolveProxy(oldRground);
			if (rground != oldRground) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__RGROUND, oldRground, rground));
			}
		}
		return rground;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Resistance basicGetRground() {
		return rground;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRground(Resistance newRground) {
		Resistance oldRground = rground;
		rground = newRground;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__RGROUND, oldRground, rground));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ApparentPower getShortTermS() {
		if (shortTermS != null && shortTermS.eIsProxy()) {
			InternalEObject oldShortTermS = (InternalEObject)shortTermS;
			shortTermS = (ApparentPower)eResolveProxy(oldShortTermS);
			if (shortTermS != oldShortTermS) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__SHORT_TERM_S, oldShortTermS, shortTermS));
			}
		}
		return shortTermS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ApparentPower basicGetShortTermS() {
		return shortTermS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setShortTermS(ApparentPower newShortTermS) {
		ApparentPower oldShortTermS = shortTermS;
		shortTermS = newShortTermS;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__SHORT_TERM_S, oldShortTermS, shortTermS));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public WindingType getWindingType() {
		return windingType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setWindingType(WindingType newWindingType) {
		WindingType oldWindingType = windingType;
		windingType = newWindingType == null ? WINDING_TYPE_EDEFAULT : newWindingType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__WINDING_TYPE, oldWindingType, windingType));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reactance getX() {
		if (x != null && x.eIsProxy()) {
			InternalEObject oldX = (InternalEObject)x;
			x = (Reactance)eResolveProxy(oldX);
			if (x != oldX) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__X, oldX, x));
			}
		}
		return x;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reactance basicGetX() {
		return x;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setX(Reactance newX) {
		Reactance oldX = x;
		x = newX;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__X, oldX, x));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reactance getX0() {
		if (x0 != null && x0.eIsProxy()) {
			InternalEObject oldX0 = (InternalEObject)x0;
			x0 = (Reactance)eResolveProxy(oldX0);
			if (x0 != oldX0) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__X0, oldX0, x0));
			}
		}
		return x0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reactance basicGetX0() {
		return x0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setX0(Reactance newX0) {
		Reactance oldX0 = x0;
		x0 = newX0;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__X0, oldX0, x0));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reactance getXground() {
		if (xground != null && xground.eIsProxy()) {
			InternalEObject oldXground = (InternalEObject)xground;
			xground = (Reactance)eResolveProxy(oldXground);
			if (xground != oldXground) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.TRANSFORMER_WINDING__XGROUND, oldXground, xground));
			}
		}
		return xground;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reactance basicGetXground() {
		return xground;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setXground(Reactance newXground) {
		Reactance oldXground = xground;
		xground = newXground;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.TRANSFORMER_WINDING__XGROUND, oldXground, xground));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case WiresPackage.TRANSFORMER_WINDING__B:
				if (resolve) return getB();
				return basicGetB();
			case WiresPackage.TRANSFORMER_WINDING__B0:
				if (resolve) return getB0();
				return basicGetB0();
			case WiresPackage.TRANSFORMER_WINDING__CONNECTION_TYPE:
				return getConnectionType();
			case WiresPackage.TRANSFORMER_WINDING__EMERGENCY_S:
				if (resolve) return getEmergencyS();
				return basicGetEmergencyS();
			case WiresPackage.TRANSFORMER_WINDING__G:
				if (resolve) return getG();
				return basicGetG();
			case WiresPackage.TRANSFORMER_WINDING__G0:
				if (resolve) return getG0();
				return basicGetG0();
			case WiresPackage.TRANSFORMER_WINDING__GROUNDED:
				if (resolve) return getGrounded();
				return basicGetGrounded();
			case WiresPackage.TRANSFORMER_WINDING__INSULATION_U:
				if (resolve) return getInsulationU();
				return basicGetInsulationU();
			case WiresPackage.TRANSFORMER_WINDING__R:
				if (resolve) return getR();
				return basicGetR();
			case WiresPackage.TRANSFORMER_WINDING__R0:
				if (resolve) return getR0();
				return basicGetR0();
			case WiresPackage.TRANSFORMER_WINDING__RATED_S:
				if (resolve) return getRatedS();
				return basicGetRatedS();
			case WiresPackage.TRANSFORMER_WINDING__RATED_U:
				if (resolve) return getRatedU();
				return basicGetRatedU();
			case WiresPackage.TRANSFORMER_WINDING__RGROUND:
				if (resolve) return getRground();
				return basicGetRground();
			case WiresPackage.TRANSFORMER_WINDING__SHORT_TERM_S:
				if (resolve) return getShortTermS();
				return basicGetShortTermS();
			case WiresPackage.TRANSFORMER_WINDING__WINDING_TYPE:
				return getWindingType();
			case WiresPackage.TRANSFORMER_WINDING__X:
				if (resolve) return getX();
				return basicGetX();
			case WiresPackage.TRANSFORMER_WINDING__X0:
				if (resolve) return getX0();
				return basicGetX0();
			case WiresPackage.TRANSFORMER_WINDING__XGROUND:
				if (resolve) return getXground();
				return basicGetXground();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case WiresPackage.TRANSFORMER_WINDING__B:
				setB((Susceptance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__B0:
				setB0((Susceptance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__CONNECTION_TYPE:
				setConnectionType((WindingConnection)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__EMERGENCY_S:
				setEmergencyS((ApparentPower)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__G:
				setG((Conductance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__G0:
				setG0((Conductance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__GROUNDED:
				setGrounded((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__INSULATION_U:
				setInsulationU((Voltage)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__R:
				setR((Resistance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__R0:
				setR0((Resistance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__RATED_S:
				setRatedS((ApparentPower)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__RATED_U:
				setRatedU((Voltage)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__RGROUND:
				setRground((Resistance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__SHORT_TERM_S:
				setShortTermS((ApparentPower)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__WINDING_TYPE:
				setWindingType((WindingType)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__X:
				setX((Reactance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__X0:
				setX0((Reactance)newValue);
				return;
			case WiresPackage.TRANSFORMER_WINDING__XGROUND:
				setXground((Reactance)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case WiresPackage.TRANSFORMER_WINDING__B:
				setB((Susceptance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__B0:
				setB0((Susceptance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__CONNECTION_TYPE:
				setConnectionType(CONNECTION_TYPE_EDEFAULT);
				return;
			case WiresPackage.TRANSFORMER_WINDING__EMERGENCY_S:
				setEmergencyS((ApparentPower)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__G:
				setG((Conductance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__G0:
				setG0((Conductance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__GROUNDED:
				setGrounded((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__INSULATION_U:
				setInsulationU((Voltage)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__R:
				setR((Resistance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__R0:
				setR0((Resistance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__RATED_S:
				setRatedS((ApparentPower)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__RATED_U:
				setRatedU((Voltage)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__RGROUND:
				setRground((Resistance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__SHORT_TERM_S:
				setShortTermS((ApparentPower)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__WINDING_TYPE:
				setWindingType(WINDING_TYPE_EDEFAULT);
				return;
			case WiresPackage.TRANSFORMER_WINDING__X:
				setX((Reactance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__X0:
				setX0((Reactance)null);
				return;
			case WiresPackage.TRANSFORMER_WINDING__XGROUND:
				setXground((Reactance)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case WiresPackage.TRANSFORMER_WINDING__B:
				return b != null;
			case WiresPackage.TRANSFORMER_WINDING__B0:
				return b0 != null;
			case WiresPackage.TRANSFORMER_WINDING__CONNECTION_TYPE:
				return connectionType != CONNECTION_TYPE_EDEFAULT;
			case WiresPackage.TRANSFORMER_WINDING__EMERGENCY_S:
				return emergencyS != null;
			case WiresPackage.TRANSFORMER_WINDING__G:
				return g != null;
			case WiresPackage.TRANSFORMER_WINDING__G0:
				return g0 != null;
			case WiresPackage.TRANSFORMER_WINDING__GROUNDED:
				return grounded != null;
			case WiresPackage.TRANSFORMER_WINDING__INSULATION_U:
				return insulationU != null;
			case WiresPackage.TRANSFORMER_WINDING__R:
				return r != null;
			case WiresPackage.TRANSFORMER_WINDING__R0:
				return r0 != null;
			case WiresPackage.TRANSFORMER_WINDING__RATED_S:
				return ratedS != null;
			case WiresPackage.TRANSFORMER_WINDING__RATED_U:
				return ratedU != null;
			case WiresPackage.TRANSFORMER_WINDING__RGROUND:
				return rground != null;
			case WiresPackage.TRANSFORMER_WINDING__SHORT_TERM_S:
				return shortTermS != null;
			case WiresPackage.TRANSFORMER_WINDING__WINDING_TYPE:
				return windingType != WINDING_TYPE_EDEFAULT;
			case WiresPackage.TRANSFORMER_WINDING__X:
				return x != null;
			case WiresPackage.TRANSFORMER_WINDING__X0:
				return x0 != null;
			case WiresPackage.TRANSFORMER_WINDING__XGROUND:
				return xground != null;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (connectionType: ");
		result.append(connectionType);
		result.append(", windingType: ");
		result.append(windingType);
		result.append(')');
		return result.toString();
	}

} //TransformerWindingImpl
